package com.zige.zige.pojo;

import android.util.Log;

import org.json.JSONObject;

import java.io.Serializable;

/**
 * Created by Fei on 2015/11/13.
 * <p/>
 * 精选视频
 */
public class SelectedVideo implements JSONSupport, Serializable {


    //
    //视频id
    public String vid;
    //视频名称
    public String videoName;
    //视频类型
    public String themeName;
    //视频描述
    public String themeDesc;

    //视频图片地址
    public String videoImageUrl;
    //视频声音地址
    public String videoVoiceUrl;
    //视频地址
    public String videoUrl;

    //点赞
    public String praiseUserids;

    //视频类型
    /***
     * 1代表活动视频
     * 0代表精选视频
     **/
    public int videoType;

    /***
     * 活动视频
     */

    //活动视频类型
    public int activityVideoType;

    //活动视频名称
    public String activityVideoName;

    //活动视频图片地址
    public String activityVideoPicUrl;

    //活动视频地址
    public String activityVideoUrl;


    @Override
    public void parsefromJSON(String json) {
        try {
            JSONObject object = new JSONObject(json);

            this.vid = object.getString("vid");
            this.videoType = object.getInt("videoType");


            /**精选视频*/
            this.videoName = object.getString("videoName");
            this.themeName = object.getString("themeName");
            this.themeDesc = object.getString("themeDesc");
            this.videoImageUrl = object.getString("videoPicUrl");
            this.videoVoiceUrl = object.getString("themeVoiceUrl");
            this.videoUrl = object.getString("videoUrl");
            this.praiseUserids = object.getString("praiseUserids");

            /**活动视频*/
            this.activityVideoName = object.getString("activityName");
            this.activityVideoType = object.getInt("activityType");
            this.activityVideoPicUrl = object.getString("picUrl");
            this.activityVideoUrl = object.getString("pageUrl");


        } catch (Exception e) {
            e.printStackTrace();
        }

    }


}
